From 9500fdfe2b09e3acb81a166f908f8102b925c1fc Mon Sep 17 00:00:00 2001 From: tsteven4 <13596209+tsteven4@users.noreply.github.com> Date: Wed, 8 Nov 2023 18:40:36 -0700 Subject: [PATCH] add fedora 39 to ci (#1211) * add fedora 39 to ci * retire qAsConst for std::as_const --- .github/workflows/fedora.yml | 4 ++++ bend.cc | 6 ++++-- duplicate.cc | 5 +++-- exif.cc | 8 ++++---- garmin.cc | 3 ++- garmin_txt.cc | 4 ++-- gpx.cc | 6 ++++-- interpolate.cc | 4 ++-- lowranceusr.cc | 9 +++++---- mkshort.cc | 6 +++--- position.cc | 4 ++-- radius.cc | 5 +++-- resample.cc | 5 +++-- route.cc | 3 ++- tools/Dockerfile_f39 | 22 ++++++++++++++++++++++ trackfilter.cc | 15 ++++++++------- unicsv.cc | 3 ++- util.cc | 5 +++-- vecs.cc | 7 ++++--- waypt.cc | 3 ++- xcsv.cc | 12 +++++++----- 21 files changed, 91 insertions(+), 48 deletions(-) create mode 100644 tools/Dockerfile_f39 diff --git a/.github/workflows/fedora.yml b/.github/workflows/fedora.yml index 76543d9d5..ce8187ab7 100644 --- a/.github/workflows/fedora.yml +++ b/.github/workflows/fedora.yml @@ -24,6 +24,10 @@ jobs: CMAKE_PREFIX_PATH: '/usr/lib64/cmake/Qt5' - IMAGE: '38' CMAKE_PREFIX_PATH: '/usr/lib64/cmake/Qt6' + - IMAGE: '39' + CMAKE_PREFIX_PATH: '/usr/lib64/cmake/Qt5' + - IMAGE: '39' + CMAKE_PREFIX_PATH: '/usr/lib64/cmake/Qt6' container: image: gpsbabel-docker.jfrog.io/tsteven4/gpsbabel_build_environment_f${{ matrix.IMAGE }} env: diff --git a/bend.cc b/bend.cc index 1bfb7060e..29cc1d488 100644 --- a/bend.cc +++ b/bend.cc @@ -22,12 +22,14 @@ #include // macos wants abs from here! #include // for strtod, abs +#include // for as_const #include // for QString -#include // for qAsConst, QAddConst<>::Type, foreach +#include // for QForeachContainer, qMakeForeachContainer, foreach #include "defs.h" #include "bend.h" +#include "formspec.h" // for FormatSpecificDataList #include "grtcirc.h" // for RAD, heading_true_degrees, gcdist, linepart, radtometers, DEG @@ -159,7 +161,7 @@ void BendFilter::process_route_orig(const route_head* route_orig) void BendFilter::process() { - for (const auto* route_orig : qAsConst(*routes_orig)) { + for (const auto* route_orig : std::as_const(*routes_orig)) { process_route_orig(route_orig); } } diff --git a/duplicate.cc b/duplicate.cc index 252c068e9..552b23faf 100644 --- a/duplicate.cc +++ b/duplicate.cc @@ -21,9 +21,10 @@ #include "duplicate.h" +#include // for as_const + #include // for QList, QList<>::iterator, QList<>::const_iterator #include // for QMultiHash -#include // for qAsConst #include "defs.h" @@ -42,7 +43,7 @@ void DuplicateFilter::init() void DuplicateFilter::process() { QMultiHash wpthash; - for (Waypoint* waypointp : qAsConst(*global_waypoint_list)) { + for (Waypoint* waypointp : std::as_const(*global_waypoint_list)) { QString key; if (lcopt) { diff --git a/exif.cc b/exif.cc index 2e0ba8289..6521cbb64 100644 --- a/exif.cc +++ b/exif.cc @@ -50,7 +50,7 @@ #include // for QVariant #include // for QVector #include // for UTC, ISODate -#include // for qAsConst, qPrintable, qint64 +#include // for qPrintable, qint64 #include // for sort, min #include // for assert @@ -61,7 +61,7 @@ #include // for printf, SEEK_SET, snprintf, SEEK_CUR #include // for abs #include // for memcmp, strlen -#include // for add_const<>::type +#include // for as_const #include "defs.h" // for Waypoint, fatal, warning, global_options, global_opts, unknown_alt, xfree, route_disp_all, track_disp_all, waypt_disp_all, wp_flags, KNOTS_TO_MPS, KPH_TO_MPS, MPH_TO_MPS, MPS_TO_KPH, WAYPT_HAS, case_ignore_strcmp, waypt_add, xstrdup, xstrndup, fix_2d #include "garmin_tables.h" // for gt_lookup_datum_index @@ -273,7 +273,7 @@ ExifFormat::exif_read_datestamp(const ExifTag* tag) void ExifFormat::exif_release_apps() { - for (auto* app : qAsConst(*exif_apps)) { + for (auto* app : std::as_const(*exif_apps)) { if (app->fcache) { gbfclose(app->fcache); } @@ -1304,7 +1304,7 @@ ExifFormat::exif_write_apps() const { gbfputuint16(0xFFD8, fout_); - for (auto* app : qAsConst(*exif_apps)) { + for (auto* app : std::as_const(*exif_apps)) { gbfputuint16(app->marker, fout_); diff --git a/garmin.cc b/garmin.cc index dd04edc42..f6fd25dd6 100644 --- a/garmin.cc +++ b/garmin.cc @@ -26,6 +26,7 @@ #include // for strtol #include // for memcpy, strlen, strncpy, strchr #include // for time_t +#include // for as_const #include // for QByteArray #include // for QRegularExpression @@ -873,7 +874,7 @@ waypoint_prepare() i = 0; // Iterate with waypt_disp_all? - for (const Waypoint* wpt : qAsConst(*global_waypoint_list)) { + for (const Waypoint* wpt : std::as_const(*global_waypoint_list)) { char obuf[256]; QString src; diff --git a/garmin_txt.cc b/garmin_txt.cc index 8a6a1433f..62efa8d60 100644 --- a/garmin_txt.cc +++ b/garmin_txt.cc @@ -34,7 +34,7 @@ #include // for strstr, strlen #include // for time_t, gmtime, localtime, strftime #include // for optional -#include // for pair, make_pair +#include // for as_const, pair, make_pair #include // for QByteArray #include // for QChar, QChar::Other_Control @@ -1041,7 +1041,7 @@ bind_fields(const header_type ht) const QStringList altheader = headers.at(ht).toUpper().split('\t'); int i = -1; - for (const auto& name : qAsConst(header_column_names)) { + for (const auto& name : std::as_const(header_column_names)) { i++; int field_idx = altheader.indexOf(name); diff --git a/gpx.cc b/gpx.cc index 176ecc676..f8e0cebc3 100644 --- a/gpx.cc +++ b/gpx.cc @@ -24,7 +24,10 @@ #include // for assert #include // for lround #include // for sscanf +#include // for uint16_t #include // for strchr, strncpy +#include // for optional +#include // for as_const #include // for QByteArray #include // for QDate @@ -44,7 +47,6 @@ #include // for QXmlStreamNamespaceDeclarations #include // for QXmlStreamReader, QXmlStreamReader::Characters, QXmlStreamReader::EndDocument, QXmlStreamReader::EndElement, QXmlStreamReader::Invalid, QXmlStreamReader::StartElement #include // for CaseInsensitive, UTC -#include // for qAsConst, QAddConst<>::Type #include "defs.h" #include "garmin_fs.h" // for garmin_fs_t, garmin_ilink_t @@ -1049,7 +1051,7 @@ GpxFormat::wr_init(const QString& fname) } else { if (gpx_global) { // TODO: gpx 1.1 copyright goes here - for (const auto& l : qAsConst(gpx_global->link)) { + for (const auto& l : std::as_const(gpx_global->link)) { writer->writeStartElement(QStringLiteral("link")); writer->writeAttribute(QStringLiteral("href"), l.url_); writer->writeOptionalTextElement(QStringLiteral("text"), l.url_link_text_); diff --git a/interpolate.cc b/interpolate.cc index 0148c52fc..f1367c1f2 100644 --- a/interpolate.cc +++ b/interpolate.cc @@ -22,12 +22,12 @@ #include "interpolate.h" #include // for INT_MAX -#include // for abs, ceil, isfinite, round +#include // for ceil, isfinite #include // for abs, strtod #include // for optional #include // for QString -#include // for qint64, qAsConst, qRound64 +#include // for qint64, qRound64 #include "defs.h" #include "grtcirc.h" // for linepart, RAD, gcdist, radtomiles diff --git a/lowranceusr.cc b/lowranceusr.cc index cbfd1f05c..6a06e1322 100644 --- a/lowranceusr.cc +++ b/lowranceusr.cc @@ -93,6 +93,7 @@ #include // for int64_t #include // for abs #include // for strcmp, strlen +#include // for as_const #include // for QByteArray #include // for QDate @@ -104,7 +105,7 @@ #include // for QTextEncoder #include // for QTime #include // for CaseInsensitive, UTC -#include // for qPrintable, uint, qAsConst, QAddConst<>::Type +#include // for qPrintable, uint, QAddConst<>::Type #include "defs.h" #include "formspec.h" // for FsChainFind, FsChainAdd, kFsLowranceusr4, FormatSpecificData @@ -134,7 +135,7 @@ LowranceusrFormat::same_points(const Waypoint* A, const Waypoint* B) void LowranceusrFormat::register_waypt(const Waypoint* wpt) const { - for (const Waypoint* cmp : qAsConst(*waypt_table)) { + for (const Waypoint* cmp : std::as_const(*waypt_table)) { if (same_points(wpt, cmp)) { return; } @@ -154,7 +155,7 @@ const Waypoint* LowranceusrFormat::lowranceusr4_find_waypt(uint uid_unit, int uid_seq_low, int uid_seq_high) { // Iterate with waypt_disp_all? - for (const Waypoint* waypointp : qAsConst(*global_waypoint_list)) { + for (const Waypoint* waypointp : std::as_const(*global_waypoint_list)) { const auto* fs = reinterpret_cast(waypointp->fs.FsChainFind(kFsLowranceusr4)); if (fs && fs->uid_unit == uid_unit && @@ -175,7 +176,7 @@ const Waypoint* LowranceusrFormat::lowranceusr4_find_global_waypt(uint id1, uint id2, uint id3, uint id4) { // Iterate with waypt_disp_all? - for (const Waypoint* waypointp : qAsConst(*global_waypoint_list)) { + for (const Waypoint* waypointp : std::as_const(*global_waypoint_list)) { const auto* fs = reinterpret_cast(waypointp->fs.FsChainFind(kFsLowranceusr4)); if (fs && fs->UUID1 == id1 && diff --git a/mkshort.cc b/mkshort.cc index 8bf839b41..92b3416b4 100644 --- a/mkshort.cc +++ b/mkshort.cc @@ -23,13 +23,13 @@ #include // for assert #include // for isspace, isdigit +#include // for as_const #include // for QByteArray #include // for QChar, QChar::ReplacementCharacter #include // for QString #include // for QVector #include // for CaseInsensitive -#include // for qAsConst #include "defs.h" #include "geocache.h" // for Geocache @@ -254,7 +254,7 @@ QByteArray MakeShort::mkshort(const QByteArray& istring, bool is_utf8) */ QByteArray tstring; ostring.swap(tstring); - for (const auto ch : qAsConst(tstring)) { + for (const auto ch : std::as_const(tstring)) { if (!isspace(ch)) { ostring.append(ch); } @@ -277,7 +277,7 @@ QByteArray MakeShort::mkshort(const QByteArray& istring, bool is_utf8) { QByteArray tstring; ostring.swap(tstring); - for (const auto ch : qAsConst(tstring)) { + for (const auto ch : std::as_const(tstring)) { if (badchars_.contains(ch)) { continue; } diff --git a/position.cc b/position.cc index 9060b916c..a7275b84e 100644 --- a/position.cc +++ b/position.cc @@ -22,10 +22,10 @@ #include "position.h" #include // for abs -#include // for strtod +#include // for strtod, abs #include // for QList -#include // for qAsConst, qRound64, qint64 +#include // for qRound64, qint64 #include "defs.h" #include "src/core/datetime.h" // for DateTime diff --git a/radius.cc b/radius.cc index ce19ceb83..5552790d2 100644 --- a/radius.cc +++ b/radius.cc @@ -22,9 +22,10 @@ #include "radius.h" #include // for strtod +#include // for as_const #include // for QString -#include // for qAsConst, QAddConst<>::Type, foreach +#include // QAddConst<>::Type, foreach #include "defs.h" // for Waypoint, del_marked_wpts, route_add_head, route_add_wpt, waypt_add, waypt_sort, waypt_swap, xstrtoi, route_head, WaypointList, kMilesPerKilometer @@ -73,7 +74,7 @@ void RadiusFilter::process() waypt_swap(comp); int i = 0; - for (Waypoint* wp : qAsConst(comp)) { + for (Waypoint* wp : std::as_const(comp)) { delete static_cast(wp->extra_data); wp->extra_data = nullptr; diff --git a/resample.cc b/resample.cc index a7eb97313..74a77d84a 100644 --- a/resample.cc +++ b/resample.cc @@ -24,12 +24,13 @@ #include // for round #include // for optional #include // for tuple, tuple_element<>::type +#include // for as_const #include // for QDebug #include // for QList<>::const_iterator #include // for QString #include // for qSetRealNumberPrecision -#include // for qDebug, qAsConst, qint64 +#include // for qDebug, qint64 #include "defs.h" // for Waypoint, route_head, fatal, WaypointList, track_add_wpt, track_disp_all, RouteList, track_add_head, track_del_wpt, track_swap, UrlList, gb_color, global_options, global_opts #include "src/core/datetime.h" // for DateTime @@ -88,7 +89,7 @@ void ResampleFilter::average_waypoint(Waypoint* wpt, bool zero_stuffed) } counter = 0; if (global_opts.debug_level >= 5) { - for (const auto& [pos, avc, alt] : qAsConst(history)) { + for (const auto& [pos, avc, alt] : std::as_const(history)) { qDebug() << "initial conditions" << pos << avc << alt; } qDebug() << "initial accumulator" << accumulated_position << accumulated_altitude_valid_count << accumulated_altitude; diff --git a/route.cc b/route.cc index f0a17cc6e..f8fdd8422 100644 --- a/route.cc +++ b/route.cc @@ -20,6 +20,7 @@ #include // for assert #include // for nullptr_t #include // for optional, operator>, operator< +#include // for as_const #include // for operator>, QDateTime, operator< #include // for QList<>::const_iterator @@ -462,7 +463,7 @@ RouteList::del_marked_wpts(route_head* rte) // mimic trkseg handling from WaypointList::del_rte_waypt bool inherit_new_trkseg = false; - for (Waypoint* wpt : qAsConst(oldlist)) { + for (Waypoint* wpt : std::as_const(oldlist)) { if (wpt->wpt_flags.marked_for_deletion) { if (wpt->wpt_flags.new_trkseg) { inherit_new_trkseg = true; diff --git a/tools/Dockerfile_f39 b/tools/Dockerfile_f39 new file mode 100644 index 000000000..5d89d175f --- /dev/null +++ b/tools/Dockerfile_f39 @@ -0,0 +1,22 @@ +# this file is used to build the image gpsbabel_build_environment used by travis. + +FROM fedora:39 + +LABEL maintainer="https://github.com/tsteven4" + +WORKDIR /app + +# basic tools to build +RUN dnf install --assumeyes git make valgrind diffutils findutils langpacks-en ninja-build && \ + dnf clean all +# libraries used by gpsbabel. zlib and shapelib may or may not be used depending qmake options. +RUN dnf install --assumeyes libusb1-devel zlib-devel shapelib-devel && \ + dnf clean all +# Qt used by gpsbabel, gpsbabelfe +RUN dnf install --assumeyes qt5-qtbase-devel qt5-qtserialport-devel qt5-qtwebengine-devel qt5-linguist qt5-qttranslations && \ + dnf clean all +RUN dnf install --assumeyes qt6-qtbase-devel qt6-qtserialport-devel qt6-qtwebengine-devel qt6-linguist qt6-qttranslations qt6-qt5compat-devel qt6-qttools-devel libxkbcommon-devel && \ + dnf clean all +# tools to build the docs +RUN dnf install --assumeyes expat desktop-file-utils libxslt docbook-style-xsl fop docbook5-style-xsl docbook5-schemas && \ + dnf clean all diff --git a/trackfilter.cc b/trackfilter.cc index 1c3dd1384..708032496 100644 --- a/trackfilter.cc +++ b/trackfilter.cc @@ -30,6 +30,7 @@ static constexpr bool TRACKF_DBG = false; #include // for strlen, strchr, strcmp #include // for gmtime, strftime, time_t, tm #include // for next +#include // for as_const #include // for QByteArray #include // for QChar @@ -41,7 +42,7 @@ static constexpr bool TRACKF_DBG = false; #include // for QRegularExpressionMatch #include // for QString #include // for UTC, CaseInsensitive -#include // for qAsConst, foreach, qPrintable, QAddConst<>::Type, qint64 +#include // for foreach, qPrintable, QAddConst<>::Type, qint64 #include "defs.h" #include "trackfilter.h" @@ -62,7 +63,7 @@ int TrackFilter::trackfilter_opt_count() { int res = 0; - for (const auto& arg : qAsConst(args)) { + for (const auto& arg : std::as_const(args)) { if (*arg.argval != nullptr) { res++; } @@ -296,7 +297,7 @@ void TrackFilter::trackfilter_title() if (strlen(opt_title) == 0) { fatal(MYNAME "-title: Missing your title!\n"); } - for (auto* track : qAsConst(track_list)) { + for (auto* track : std::as_const(track_list)) { trackfilter_pack_init_rte_name(track, QDateTime::fromMSecsSinceEpoch(0, Qt::UTC)); } } @@ -576,7 +577,7 @@ void TrackFilter::trackfilter_move() int timeless_points = 0; - for (auto* track : qAsConst(track_list)) { + for (auto* track : std::as_const(track_list)) { foreach (Waypoint* wpt, track->waypoint_list) { if (wpt->creation_time.isValid()) { wpt->creation_time = wpt->creation_time.addMSecs(delta); @@ -607,7 +608,7 @@ void TrackFilter::trackfilter_synth() fix_type fix = trackfilter_parse_fix(&nsats); - for (auto* track : qAsConst(track_list)) { + for (auto* track : std::as_const(track_list)) { bool first = true; foreach (Waypoint* wpt, track->waypoint_list) { if (opt_fix) { @@ -757,7 +758,7 @@ void TrackFilter::trackfilter_seg2trk() { if (!track_list.isEmpty()) { QList new_track_list; - for (auto* src : qAsConst(track_list)) { + for (auto* src : std::as_const(track_list)) { new_track_list.append(src); route_head* dest = src; route_head* insert_point = src; @@ -871,7 +872,7 @@ void TrackFilter::trackfilter_faketime() assert(opt_faketime != nullptr); faketime_t faketime = trackfilter_faketime_check(opt_faketime); - for (auto* track : qAsConst(track_list)) { + for (auto* track : std::as_const(track_list)) { foreach (Waypoint* wpt, track->waypoint_list) { if (!wpt->creation_time.isValid() || faketime.force) { diff --git a/unicsv.cc b/unicsv.cc index 679c19ad4..040908078 100644 --- a/unicsv.cc +++ b/unicsv.cc @@ -24,6 +24,7 @@ #include // for fabs, lround #include // for NULL, sscanf #include // for tm +#include // for as_const #include // for QByteArray #include // for QChar @@ -207,7 +208,7 @@ UnicsvFormat::unicsv_parse_gc_code(const QString& str) } long long res = 0; - for (auto c : qAsConst(s)) { + for (auto c : std::as_const(s)) { int val = kBase31.indexOf(c); if (val < 0 || (base == 16 && val > 15)) { return 0; diff --git a/util.cc b/util.cc index c625e95d4..77e724979 100644 --- a/util.cc +++ b/util.cc @@ -27,6 +27,7 @@ #include // for size_t, vsnprintf, FILE, fopen, printf, sprintf, stderr, stdin, stdout #include // for abs, calloc, free, malloc, realloc #include // for strlen, strcat, strstr, memcpy, strcmp, strcpy, strdup, strchr, strerror +#include // for as_const #include // for QByteArray #include // for QChar, operator<=, operator>= @@ -41,7 +42,7 @@ #include // for CaseInsensitive #include // for QTime #include // for QTimeZone -#include // for qAsConst, qEnvironmentVariableIsSet, QAddConst<>::Type, qPrintable +#include // for qEnvironmentVariableIsSet, QAddConst<>::Type, qPrintable #include "defs.h" #include "src/core/datetime.h" // for DateTime @@ -1033,7 +1034,7 @@ void list_timezones() }; std::sort(zoneids.begin(), zoneids.end(), alpha); Warning() << "Available timezones are:"; - for (const auto& id : qAsConst(zoneids)) { + for (const auto& id : std::as_const(zoneids)) { Warning() << id; } } diff --git a/vecs.cc b/vecs.cc index 944e863ab..75238c8fc 100644 --- a/vecs.cc +++ b/vecs.cc @@ -31,12 +31,13 @@ #include // for QStringList #include // for QVector #include // for CaseInsensitive -#include // for qPrintable, qAsConst +#include // for qPrintable #include // for sort #include // for assert #include // for printf, putchar, sscanf -#include // for add_const<>::type, is_base_of +#include // for is_base_of +#include // for as_const #include "defs.h" // for arglist_t, ff_vecs_t, ff_cap, fatal, CSTR, ARGTYPE_TYPEMASK, case_ignore_strcmp, global_options, global_opts, warning, xfree, ARGTYPE_BOOL, ff_cap_read, ff_cap_write, ARGTYPE_HIDDEN, ff_type_internal, xstrdup, ARGTYPE_INT, ARGTYPE_REQUIRED, ARGTYPE_FLOAT #include "dg-100.h" // for Dg100FileFormat, Dg100SerialFormat, Dg200FileFormat, Dg200SerialFormat @@ -817,7 +818,7 @@ Vecs::fmtinfo_t Vecs::find_vec(const QString& fmtargstring) * Didn't find it in the table of "real" file types, so plan B * is to search the list of xcsv styles. */ - for (const auto& svec : qAsConst(style_list)) { + for (const auto& svec : std::as_const(style_list)) { if (fmtname.compare(svec.name, Qt::CaseInsensitive) != 0) { continue; } diff --git a/waypt.cc b/waypt.cc index 77a219faa..f7f0783b8 100644 --- a/waypt.cc +++ b/waypt.cc @@ -22,6 +22,7 @@ #include // for assert #include // for fabs #include // for fflush, fprintf, stdout +#include // for as_const #include // for QChar #include // for QDateTime @@ -640,7 +641,7 @@ WaypointList::del_marked_wpts() WaypointList oldlist; swap(oldlist); - for (Waypoint* wpt : qAsConst(oldlist)) { + for (Waypoint* wpt : std::as_const(oldlist)) { if (wpt->wpt_flags.marked_for_deletion) { delete wpt; } else { diff --git a/xcsv.cc b/xcsv.cc index d649fff55..9123cf606 100644 --- a/xcsv.cc +++ b/xcsv.cc @@ -33,6 +33,7 @@ #include // for strlen, strncmp, strcmp #include // for gmtime, localtime, time_t, mktime, strftime #include // for optional +#include // for as_const #include // for QByteArray #include // for QChar @@ -46,7 +47,8 @@ #include // for QString, operator+, operator== #include // for QStringList #include // for QTextStream -#include // for qAsConst, qRound, qPrintable +#include // for CaseInsensitive +#include // for qRound, qPrintable #include "defs.h" #include "csv_util.h" // for csv_stringtrim, dec_to_human, csv_stringclean, human_to_dec, ddmmdir_to_degrees, dec_to_intdeg, decdir_to_dec, intdeg_to_dec, csv_linesplit @@ -850,7 +852,7 @@ XcsvFormat::read() * pre-read the file to know how many data lines we should be seeing, * we take this cheap shot at the data and cross our fingers. */ - for (const auto& ogp : qAsConst(xcsv_style->epilogue)) { + for (const auto& ogp : std::as_const(xcsv_style->epilogue)) { if (ogp.startsWith(buff)) { buff.clear(); break; @@ -1040,7 +1042,7 @@ XcsvFormat::xcsv_waypt_pr(const Waypoint* wpt) } int i = 0; - for (const auto& fmp : qAsConst(xcsv_style->ofields)) { + for (const auto& fmp : std::as_const(xcsv_style->ofields)) { double lat = latitude; double lon = longitude; /* @@ -1659,7 +1661,7 @@ XcsvFormat::write() waypt_out_count = 0; /* output prologue lines, if any. */ - for (const auto& line : qAsConst(xcsv_style->prologue)) { + for (const auto& line : std::as_const(xcsv_style->prologue)) { QString line_to_write = xcsv_replace_tokens(line); xcsv_file->stream << line_to_write << xcsv_style->record_delimiter; } @@ -1682,7 +1684,7 @@ XcsvFormat::write() } /* output epilogue lines, if any. */ - for (const auto& line : qAsConst(xcsv_style->epilogue)) { + for (const auto& line : std::as_const(xcsv_style->epilogue)) { QString line_to_write = xcsv_replace_tokens(line); xcsv_file->stream << line_to_write << xcsv_style->record_delimiter; } -- 2.30.2